#ifndef TYPES_H_
#define TYPES_H_

#include "Object.h"
#include "Functions.h"

class Size : public Object
{
	public:
		int w, h;
		virtual ~Size(){}
		Size(){ w = 0; h = 0;}
		Size(int s){ w = s; h = s;}
		Size(int _w, int _h){ w = _w; h = _h;}
		
		void setWidth(int _w){ w = _w;}
		void setHeight(int _h){ h = _h;}
		
		int getWidth(){ return w;}
		int getHeight(){ return h;}
		
		virtual string toString()
		{
			string rstr = "Size: w = ";
			rstr += intToString(w); rstr += "; h = ";
			rstr += intToString(h); rstr += ";";
			return rstr;
		}
};

class Location : public Object
{
	public:
		int x,y;
		virtual ~Location(){}
		Location(){ x = 0; y = 0;}
		Location(int pos){x = pos; y = pos;}
		Location(int _x, int _y){x = _x; y = _y;}
		
		void setX(int _x){ x = x;}
		void setY(int _y){ y = _y;}
		
		int getX(){return x;}
		int getY(){return y;}
		
		virtual string toString()
		{
			string rstr = "Location: x = ";
			rstr += intToString(x); rstr += "; y = ";
			rstr += intToString(y); rstr += ";";
			return rstr;
		}
};

Location stringToLocation(const char *str);
Size stringToSize(const char *str);

#endif /*TYPES_H_*/
